package com.smile.api;

import com.smile.commons.page.R;
import com.smile.model.request.LiveStartPushRequest;
import com.smile.model.request.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "smile-plus-standalone-device", contextId = "payload", path = "/api/device")
public interface PayloadApi {

    /**
     * 获取负载控制
     *
     * @param payloadAuthorityGrabRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/payloadAuthorityGrab")
    R<Void> payloadAuthorityGrab(@RequestBody PayloadAuthorityGrabRequest payloadAuthorityGrabRequest) throws Exception;

    /**
     * 开始拍照
     *
     * @param cameraPhotoTakeRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraPhotoTake")
    R<Void> cameraPhotoTake(@RequestBody CameraPhotoTakeRequest cameraPhotoTakeRequest) throws Exception;

    /**
     * 结束拍照
     *
     * @param cameraPhotoStopRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraPhotoStop")
    R<Void> cameraPhotoStop(@RequestBody CameraPhotoStopRequest cameraPhotoStopRequest) throws Exception;

    /**
     * 关闭直播
     *
     * @param liveStopPushRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/liveStopPush")
    R<Void> liveStopPush(@RequestBody LiveStartPushRequest liveStopPushRequest) throws Exception;

    /**
     * 开始摄像
     *
     * @param cameraRecordStartRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraRecordingStart")
    R<Void> cameraRecordingStart(@RequestBody CameraRecordStartRequest cameraRecordStartRequest) throws Exception;

    /**
     * 停止摄像
     *
     * @param cameraRecordStopRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraRecordingStop")
    R<Void> cameraRecordingStop(@RequestBody CameraRecordStopRequest cameraRecordStopRequest) throws Exception;


    /**
     * 云台重置
     *
     * @param cameraRecordStopRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/gimbalReset")
    R<Void> gimbalReset(@RequestBody GimbalResetRequest cameraRecordStopRequest) throws Exception;

    /**
     * 变焦
     *
     * @param cameraFocalLengthSetRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraFocalLengthSet")
    R<Void> cameraFocalLengthSet(@RequestBody CameraFocalLengthSetRequest cameraFocalLengthSetRequest) throws Exception;


    /**
     * 画面拖动控制
     * @param cameraScreenDragRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraScreenDrag")
    R<Void> cameraScreenDrag(@RequestBody CameraScreenDragRequest cameraScreenDragRequest) throws Exception;

    /**
     * 框选变焦
     * @param cameraFrameZoomRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraFrameZoom")
    R<Void> cameraFrameZoom(@RequestBody CameraFrameZoomRequest cameraFrameZoomRequest) throws Exception;

    /**
     * 框选变焦
     * @param cameraModeSwitchRequest
     * @return
     * @throws Exception
     */
    @PostMapping("/payload/cameraModeSwitch")
    R<Void> cameraModeSwitch(@RequestBody CameraModeSwitchRequest cameraModeSwitchRequest) throws Exception;

}
